import https from '../../request'

// 获取用户列表
export const getusersAPI = (params) => https.get('users', { params })

// 删除
export const delusersAPI = (params)=>https.delete(`users/${params}`)

// 添加
export const addusersAPI = (params) => https.post('users', params)

// 修改
export const editusersAPI = (params) => https.put('users/' + params.id, params)

// 修改用户状态
export const editstatusAPI = (params) => https.put(`users/${params.id}/state/${params.mg_state}`)

// 分配权限
export const privilegesusers = (params) => https.put(`users/${params.id}/role`,{rid: params.id})

// 角色列表
export const rolelist = (params)=>https.get('roles',params)